<div ng-include="'html/component/nav.html'" ng-controller="NavCtrl"></div>
<ul class="set_item" ng-include="'html/component/left_nav.html'" ng-controller="OrderNavCtrl"></ul>
<style>
    .list_animate{
        -webkit-transition: all 0.2s;
        transition: all 0.2s;
        position: relative; left:0px;
    }
    .list_animate.ng-hide{left:-1000px;}

    .set_cont.list_page .list_table th,
    .set_cont.list_page .list_table td{ width: auto;}
</style>
<div class="set_box">
    <h1 class="set_title"><!--维修单-->{{language.TIPS_FIX_ORDER}}
        <span class="title_btn_group">
            <a ng-show="buttonOption == 1"  class="title_btn" href="javascript:void(0);" ng-click="option(option_code);" >{{option_code|fix_status}}</a>
            <a ng-show="buttonStop == 1"  class="title_btn" href="javascript:void(0);" ng-click="stop();" >{{5|fix_status}}</a>
            <a ng-show="buttonClose == 1"  class="title_btn" href="javascript:void(0);" ng-click="close_detail();" ><!--关闭-->{{language.TIPS_RECEIPT_CLOSE}}</a>

            <a ng-show="buttonHigh == 1" class="title_btn" href="javascript:void(0);" ng-click="search();" ><!--高级查询-->{{language.TIPS_RECEIPT_ADVANCE_QUERY}}</a>
            <a ng-show="buttonRefresh == 1" class="title_btn" href="javascript:void(0);" ng-click="refresh_data();" ><!--刷新-->{{language.TIPS_RECEIPT_REFRESH}}</a>

        </span>
    </h1>
    <div class="set_cont list_page list_animate" ng-show="buttonRefresh == 1">
        <table class="list_table">
            <thead>
            <tr>
                <th><!--单据编号-->{{language.TIPS_RECEIPT_DOC_SEQ}}</th>
                <th><!--顾客编号-->{{language.TIPS_CUSTOMER_NUM}}</th>
                <th><!--手机号-->{{language.TIPS_TEL}}</th>
                <th><!--维修费用-->{{language.TIPS_FIX_MONEY}}</th>
                <th><!--单据状态-->{{language.TIPS_FIX_STATUS}}</th>
                <th><!--经手店员-->{{language.TIPS_FIX_DIANYUAN}}</th>
                <th><!--核准-->{{language.TIPS_FIX_APPROVAL}}</th>
                <th><!--审核-->{{language.TIPS_FIX_CHECK}}</th>
                <th><!--终止-->{{language.TIPS_FIX_STOP}}</th></tr>
            </thead>
            <tbody ng-repeat="i in fix_list| orderBy:'key':true" >
            <tr ng-show="buttonMore == 1" class="date_num">
                <td class="date" colspan="8"><!--日期-->{{language.TIPS_RECEIPT_DATE}}：{{i.key}}</td>
                <td class="num">
                    <span>{{i.value.length}}</span>
                </td>
            </tr>
            <tr class="list_unit" ng-repeat="li in i.value track by $index"  >
                <td ng-click="show_detail(li.record_code);"><a href="javascript:void(0)">{{li.record_code}}</a></td>
                <td>{{li.customer_code}}</td>
                <td>{{li.tel}}</td>
                <td>{{li.fix_money|number:2}}</td>
                <td>{{li.record_status|fix_status}}</td>
                <td>{{li.guide_user_name}}</td>
                <td><input type="checkbox" disabled="disabled" ng-model="li.approved" ng-checked="li.approved==1"></td>
                <td><input type="checkbox" disabled="disabled" ng-model="li.checked" ng-checked="li.checked==1"></td>
                <td><input type="checkbox" disabled="disabled" ng-model="li.stop" ng-checked="li.stop==1"></td>
            </tr>
            </tbody>
        </table>
        <div class="btn_more"><!--更多--><button class="btn" ng-click='scoll.nextpage();' ng-show="buttonMore == 1"></button></div>
    </div>

    <div class="set_cont detail_page"  ng-show="buttonRefresh == 0" ng-swipe-right="close_detail();" >
        <form class="detail_form">
            <p class="title">
                <!--单号-->{{language.TIPS_RECEIPT_CODE}}：{{fix.record.record_code}}
            </p>
            <table class="detail_table">
                <tr>
                    <td class="name"><!--日期-->{{language.TIPS_RECEIPT_DATE}}：</td>
                    <td class="val">{{fix.record.date}}</td>
                    <td class="name"><!--店铺-->{{language.TIPS_RECEIPT_SHOP}}：</td>
                    <td class="val">{{fix.record.ShopName}}</td>
                </tr>
                <tr>
                    <td class="name"><!--手机号-->{{language.TIPS_TEL}}：</td>
                    <td class="val">{{fix.record.tel}}</td>
                </tr>
                <tr>
                    <td class="name"><!--经手店员-->{{language.TIPS_FIX_DIANYUAN}}：</td>
                    <td class="val">{{fix.record.guide_user_name}}</td>
                    <td class="name"><!--联系地址-->{{language.TIPS_FIX_ADDRESS}}：</td>
                    <td class="val">{{fix.record.address}}</td>
                </tr>
                <tr>
                    <td class="name"><!--维修费用-->{{language.TIPS_FIX_MONEY}}：</td>
                    <td class="val">{{fix.record.fix_money|number:2}}</td>
                    <td class="name"><!--实际维修费用-->{{language.TIPS_FIX_ACTUALLY_MONEY}}：</td>
                    <td class="val">{{fix.record.actual_fix_money|number:2}}</td>
                </tr>
                <tr>
                    <td class="name"><!--状态-->{{language.TIPS_RECEIPT_STATUS}}：</td>
                    <td class="val">{{fix.record.record_status|fix_status}}</td>
                    <td class="name"><!--更新时间-->{{language.TIPS_RECEIPT_UPDATE_TIME}}：</td>
                    <td class="val">{{fix.record.lastchanged}}</td>
                </tr>
                <tr>
                    <td class="name"><!--整单备注-->{{language.TIPS_ALL_REMARK}}:</td>
                    <td colspan="3">{{fix.record.remark}}</td>
                </tr>

            </table>
        </form>
        <!--<p class="tab_head">-->
            <!--<span class="{{curr=='curr_card'?'tap_btn curr':'tap_btn'}}" ng-click="memberCard()">&lt;!&ndash;会员卡记录&ndash;&gt;{{language.TIPS_VIP_HISTORY}}</span>-->
            <!--<span class="{{curr=='curr_recommend'?'tap_btn curr':'tap_btn'}}" ng-click="recommend()">&lt;!&ndash;推荐商品&ndash;&gt;{{language.TIPS_RECOMMEND_GOODS}}</span>-->
            <!--<span class="{{curr=='curr_coupon'?'tap_btn curr':'tap_btn'}}" ng-click="memberCoupon()">&lt;!&ndash;优惠券信息&ndash;&gt;{{language.TIPS_COUPON_INFO}}</span>-->
            <!--<span class="{{curr=='curr_recent'?'tap_btn curr':'tap_btn'}}" ng-click="recent()">&lt;!&ndash;购买记录&ndash;&gt;{{language.TIPS_BUY_HISTORY}}</span>-->
        <!--</p>-->

        <!--<div class="buy_recom_wrap">-->
            <!--<ul class="tab_box" ng-show="curr == 'curr_recent'" ng-include="'html/member/member_detail/goods_recent.html'"></ul>-->
            <!--<ul class="tab_box" ng-show="curr == 'curr_recommend'" ng-include="'html/member/member_detail/goods_recommend.html'"></ul>-->
            <!--<div class="tab_box" ng-show="curr == 'curr_card'" ng-include="'html/member/member_detail/card.html'"></div>-->
            <!--<div class="tab_box" ng-show="curr == 'curr_coupon'" ng-include="'html/member/member_detail/coupon.html'"></div>-->
        <!--</div>-->
        <form class="detail_form">
            <p class="title"><!--商品明细-->{{language.TIPS_RECEIPT_DETAILED}}</p>
            <table class="goods_table">
                <tr>
                    <th>sku</th>
                    <th><!--名称-->{{language.TIPS_RECEIPT_NAME}}</th>
                    <th><!--数量-->{{language.TIPS_RECEIPT_NUM}}</th>
                    <th><!--单价-->{{language.TIPS_RECEIPT_UNIT_PRICE}}</th>
                    <th><!--总价-->{{language.TIPS_RECEIPT_TOTAL_PRICE}}</th>
                    <th><!--实际维修费用-->{{language.TIPS_FIX_ACTUALLY_MONEY}}</th>
                </tr>
                <tr ng-repeat="p in fix.detail">
                    <td>{{p.sku}}</td>
                    <td>{{p.spmc}}[{{p.gg1mc}} {{p.gg2mc}}]</td>
                    <td>{{p.sl}}</td>
                    <td>{{p.dj|number:2}}</td>
                    <td>{{p.je|number:2}}</td>
                    <td>{{p.je_2|number:2}}</td>
                </tr>
            </table>

            <p class="title"><!--支付明细-->{{language.TIPS_RECEIPT_PAY_DETAIL}}</p>
            <table class="goods_table">
                <tr>
                    <th><!--支付代码-->{{language.TIPS_RECEIPT_PAY_NAME}}</th>
                    <th><!--金额-->{{language.TIPS_RECEIPT_MONEY}}</th>
                    <th><!--备注-->{{language.TIPS_RECEIPT_REMARK}}</th>
                </tr>
                <tr ng-repeat="p in fix.payment">
                    <td>{{p.jsmc}}</td>
                    <td>{{p.je|number:2}}</td>
                    <td>{{p.bz}}</td>
                </tr>
            </table>

            <p class="title"><!--附加性息-->{{language.TIPS_ADDITIONAL_MESSAGE}}</p>
            <table class="goods_table">
                <tr>
                    <td>制单人</td>
                    <td>{{fix.record.make_person}}</td>
                    <td>制单日期</td>
                    <td>{{fix.record.make_date}}</td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>收货人</td>
                    <td>{{fix.record.receive_person}}</td>
                    <td>收货时间</td>
                    <td>{{fix.record.receive_date}}</td>
                    <td>收货说明</td>
                    <td>{{fix.record.receive_describe}}</td>
                </tr>
                <tr>
                    <td>返修人</td>
                    <td>{{fix.record.repair_person}}</td>
                    <td>返修时间</td>
                    <td>{{fix.record.repair_date}}</td>
                    <td>返修说明</td>
                    <td>{{fix.record.repair_describe}}</td>
                </tr>
                <tr>
                    <td>接收人</td>
                    <td>{{fix.record.get_person}}</td>
                    <td>接收时间</td>
                    <td>{{fix.record.get_date}}</td>
                    <td>接收说明</td>
                    <td>{{fix.record.get_describe}}</td>
                </tr>
                <tr>
                    <td>返店人</td>
                    <td>{{fix.record.back_shop_person}}</td>
                    <td>返店时间</td>
                    <td>{{fix.record.back_shop_date}}</td>
                    <td>返店说明</td>
                    <td>{{fix.record.back_shop_describe}}</td>
                </tr>
                <!--<tr>-->
                    <!--<td>收款人</td>-->
                    <!--<td>{{fix.record.pay_person}}</td>-->
                    <!--<td>收款时间</td>-->
                    <!--<td>{{fix.record.pay_date}}</td>-->
                    <!--<td>收款说明</td>-->
                    <!--<td>{{fix.record.pay_describe}}</td>-->
                <!--</tr>-->
                <tr>
                    <td>完成人</td>
                    <td>{{fix.record.finished_person}}</td>
                    <td>完成时间</td>
                    <td>{{fix.record.finished_date}}</td>
                    <td>完成说明</td>
                    <td>{{fix.record.finished_describe}}</td>
                </tr>
                <tr>
                    <td>终止人</td>
                    <td>{{fix.record.stop_person}}</td>
                    <td>终止时间</td>
                    <td>{{fix.record.stop_date}}</td>
                    <td>终止说明</td>
                    <td>{{fix.record.stop_describe}}</td>
                </tr>
                <tr>
                    <td>核准人</td>
                    <td>{{fix.record.approved_person}}</td>
                    <td>核准时间</td>
                    <td>{{fix.record.approved_date}}</td>
                    <td>核准说明</td>
                    <td>{{fix.record.approved_describe}}</td>
                </tr>
                <tr>
                    <td>审批人</td>
                    <td>{{fix.record.checked_person}}</td>
                    <td>审批时间</td>
                    <td>{{fix.record.checked_date}}</td>
                    <td>审批说明</td>
                    <td>{{fix.record.checked_describe}}</td>
                </tr>
            </table>
        </form>
    </div>
</div>